import os
import zipfile

folder = 'C:/maishu/images'
zf = zipfile.ZipFile("C:/maishu/bigimages2.zip", "w")
for file in os.listdir(folder):
    file_path = os.path.join(folder, file)
    size_in_kb = os.path.getsize(file_path)/1024
    if file.endswith(('.jpg', '.jpeg', '.png', '.gif')) and size_in_kb > 30:
        zf.write(file_path)
zf.close()